package com.banyiyi.simple.pattern.visitor;

import lombok.Data;

/**
 * @ClassName StudentElement
 * @Description TODO
 * @Author yangwm
 * @Date 2023/2/23 18:03
 * @Version 1.0
 */
@Data
public class StudentElement implements Element{

    // 学生元素对于访问做出的反馈和特性
    private String name;
    private int age;

    @Override
    public void accept(Visitor visitor) {
        // 让访问者来访问当前对象
        visitor.visit(this);
    }
}
